using System;
using System.Collections.Generic;
using System.Data;

namespace Common.Data.Sql
{
	public interface IDal
	{
		DataTable GetDataTable(string connStr, string query);
		DataSet GetDataSet(string connStr, string query);
		void InsertOrUpdateEntity(string connStr, string insertQ, string updateQ, string existanceCheckQ, Dictionary<string, object> pars);
		void RunCommandWithParameter(string connStr, string commandQ, Dictionary<string, object> pars = null);
		void RunForAll<T>(string connStr, string query, IEnumerable<T> data, Func<T, Dictionary<string, object>> func);
		string InsertAllInTempFile<T>(IEnumerable<T> data, Func<T, string> func);
	}
}